﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.IO;
using BusinessObjects.BO_GetObjects;

public partial class Controls_ucAds : System.Web.UI.UserControl
{
    private string module_id;

    public string Module_id
    {
        get { return module_id; }
        set { module_id = value; }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            loadADS();
        }
    }

    protected void loadADS()
    {
        try
        {
            //Response.Write(module_id);
            DataTable objDT = BO_Ads_Picture.SelectByModule(Convert.ToInt32(module_id));
            if (objDT.Rows.Count > 0)
            {
                rptAds.DataSource = objDT;
                rptAds.DataBind();
            }
            else
            {
                rptAds.DataSource = null;
                rptAds.DataBind();
            }
        }
        catch (Exception ex)
        {

            throw;
        }
    }


}